3.220 \(\int \frac{\cot ^2(d (a+b \log (c x^n)))}{x} \, dx\)

Optimal. Leaf size=30 \[ -\frac{\cot \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\log (x) \]

[Out]

-(Cot[a*d + b*d*Log[c*x^n]]/(b*d*n)) - Log[x]

________________________________________________________________________________________

Rubi [A]  time = 0.0300002, antiderivative size = 30, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3473, 8} \[ -\frac{\cot \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\log (x) \]

Antiderivative was successfully verified.

[In]

Int[Cot[d*(a + b*Log[c*x^n])]^2/x,x]

[Out]

-(Cot[a*d + b*d*Log[c*x^n]]/(b*d*n)) - Log[x]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \frac{\cot ^2\left (d \left (a+b \log \left (c x^n\right )\right )\right )}{x} \, dx &=\frac{\operatorname{Subst}\left (\int \cot ^2(d (a+b x)) \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\frac{\cot \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\frac{\operatorname{Subst}\left (\int 1 \, dx,x,\log \left (c x^n\right )\right )}{n}\\ &=-\frac{\cot \left (a d+b d \log \left (c x^n\right )\right )}{b d n}-\log (x)\\ \end{align*}

Mathematica [C]  time = 0.109699, size = 51, normalized size = 1.7 \[ -\frac{\cot \left (a d+b d \log \left (c x^n\right )\right ) \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},-\tan ^2\left (a d+b d \log \left (c x^n\right )\right )\right )}{b d n} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[d*(a + b*Log[c*x^n])]^2/x,x]

[Out]

-((Cot[a*d + b*d*Log[c*x^n]]*Hypergeometric2F1[-1/2, 1, 1/2, -Tan[a*d + b*d*Log[c*x^n]]^2])/(b*d*n))

________________________________________________________________________________________

Maple [B]  time = 0.022, size = 63, normalized size = 2.1 \begin{align*} -{\frac{\cot \left ( d \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \right ) }{bdn}}+{\frac{\pi }{2\,bdn}}-{\frac{{\rm arccot} \left (\cot \left ( d \left ( a+b\ln \left ( c{x}^{n} \right ) \right ) \right ) \right )}{bdn}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*(a+b*ln(c*x^n)))^2/x,x)

[Out]

-1/b/d/n*cot(d*(a+b*ln(c*x^n)))+1/2/b/d/n*Pi-1/b/d/n*arccot(cot(d*(a+b*ln(c*x^n))))

________________________________________________________________________________________

Maxima [B]  time = 1.22975, size = 435, normalized size = 14.5 \begin{align*} \frac{{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} \log \left (x\right ) +{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \log \left (x\right ) \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} + b d n \log \left (x\right ) - 2 \,{\left (b d n \cos \left (2 \, b d \log \left (c\right )\right ) \log \left (x\right ) - \sin \left (2 \, b d \log \left (c\right )\right )\right )} \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right ) + 2 \,{\left (b d n \log \left (x\right ) \sin \left (2 \, b d \log \left (c\right )\right ) + \cos \left (2 \, b d \log \left (c\right )\right )\right )} \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )}{2 \, b d n \cos \left (2 \, b d \log \left (c\right )\right ) \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right ) - 2 \, b d n \sin \left (2 \, b d \log \left (c\right )\right ) \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right ) -{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \cos \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} -{\left (b d \cos \left (2 \, b d \log \left (c\right )\right )^{2} + b d \sin \left (2 \, b d \log \left (c\right )\right )^{2}\right )} n \sin \left (2 \, b d \log \left (x^{n}\right ) + 2 \, a d\right )^{2} - b d n} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*(a+b*log(c*x^n)))^2/x,x, algorithm="maxima")

[Out]

((b*d*cos(2*b*d*log(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*cos(2*b*d*log(x^n) + 2*a*d)^2*log(x) + (b*d*cos(2*b*d*l
og(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*log(x)*sin(2*b*d*log(x^n) + 2*a*d)^2 + b*d*n*log(x) - 2*(b*d*n*cos(2*b*d
*log(c))*log(x) - sin(2*b*d*log(c)))*cos(2*b*d*log(x^n) + 2*a*d) + 2*(b*d*n*log(x)*sin(2*b*d*log(c)) + cos(2*b
*d*log(c)))*sin(2*b*d*log(x^n) + 2*a*d))/(2*b*d*n*cos(2*b*d*log(c))*cos(2*b*d*log(x^n) + 2*a*d) - 2*b*d*n*sin(
2*b*d*log(c))*sin(2*b*d*log(x^n) + 2*a*d) - (b*d*cos(2*b*d*log(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*cos(2*b*d*lo
g(x^n) + 2*a*d)^2 - (b*d*cos(2*b*d*log(c))^2 + b*d*sin(2*b*d*log(c))^2)*n*sin(2*b*d*log(x^n) + 2*a*d)^2 - b*d*
n)

________________________________________________________________________________________

Fricas [B]  time = 0.490541, size = 216, normalized size = 7.2 \begin{align*} -\frac{b d n \log \left (x\right ) \sin \left (2 \, b d n \log \left (x\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d\right ) + \cos \left (2 \, b d n \log \left (x\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d\right ) + 1}{b d n \sin \left (2 \, b d n \log \left (x\right ) + 2 \, b d \log \left (c\right ) + 2 \, a d\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*(a+b*log(c*x^n)))^2/x,x, algorithm="fricas")

[Out]

-(b*d*n*log(x)*sin(2*b*d*n*log(x) + 2*b*d*log(c) + 2*a*d) + cos(2*b*d*n*log(x) + 2*b*d*log(c) + 2*a*d) + 1)/(b
*d*n*sin(2*b*d*n*log(x) + 2*b*d*log(c) + 2*a*d))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot ^{2}{\left (a d + b d \log{\left (c x^{n} \right )} \right )}}{x}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*(a+b*ln(c*x**n)))**2/x,x)

[Out]

Integral(cot(a*d + b*d*log(c*x**n))**2/x, x)

________________________________________________________________________________________

Giac [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*(a+b*log(c*x^n)))^2/x,x, algorithm="giac")

[Out]

Timed out